<!doctype html>
<html lang="en">
	<head>
		<title>JavaScript Patterns</title>
		<meta charset="utf-8">
	</head>
	<body>
		<script>
			/* Title: Immediate functions
			 Description: syntax that enables function execution as soon as it is defined
			 */

			(function () {
				console.log('watch out!');
			}());

			//alternative with less parentheses
			!function () {
				console.log('watch out!');
			}();


			// reference
			// http://www.jspatterns.com/
			// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
		</script>
	</body>
</html>
